<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>

</style>

<body>
    <script>
        var money = 100;
        while (true) {
            let re = +prompt(`
                请您选择操作：
                1.存钱
                2.取钱
                3.查看余额
                4.退出
                `//反引号
            )
            // 2.如果用户输入四退出循环
            if (re === 4) {
                break
            }
            switch (re) {
                case 1:
                    let cun = +prompt("请输入存款金额")
                    money = money + cun;
                    break
                case 2:
                    let qu = +prompt('请输入取钱金额')
                    money = money - qu;
                    break
                case 3:
                    alert('当前余额为' + money)

            }
        }


    </script>
</body>

</html>